package pl.prv.polanie.client.dto;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * GroupDTO entity. @author MyEclipse Persistence Tools
 */

public class CSVGroupDTO extends java.lang.Object implements IsSerializable, ICSVDTO {


    // Fields    
	private long id;
    private String semestersYearGroup;
    private String name;
    private Integer studentsNumber;
    private Integer scheduleProgress;


    
    
    private boolean highlighted;
    
    public static final int SORT_CONST__NAME = 0;
    public static final int SORT_CONST__SUDENTS_NUMBER = 1;
    public static final int SORT_CONST__SEMESTERS_YEAR_GROUP = 2;
    public static final int SORT_CONST__SCHEDULE_PROGRESS = 3;

    public static final int SORT_CONST__ID = 4;
    
    
    
    
    
    
    // Constructors

    /** default constructor */
    public CSVGroupDTO() {
    }

    
    /** full constructor */
    public CSVGroupDTO(long id, String semestersYearGroups, String name, Integer studentsNumber, Integer scheduleProgress) {
        this.id = id;
    	this.semestersYearGroup = semestersYearGroups;
        this.name = name;
        this.studentsNumber = studentsNumber;
        this.scheduleProgress = scheduleProgress;
    }

    
    // Property accessors



	public String getName() {
		return name;
	}


	public Integer getStudentsNumber() {
		return studentsNumber;
	}


	


	public String getSemestersYearGroup() {
		return semestersYearGroup;
	}


	public void setSemestersYearGroup(String semestersYearGroup) {
		this.semestersYearGroup = semestersYearGroup;
	}


	public void setName(String name) {
		this.name = name;
	}


	public void setStudentsNumber(Integer studentsNumber) {
		this.studentsNumber = studentsNumber;
	}



	public String toLabel() {
		String r;
		r = "" + name + " [" + studentsNumber + "] " + getSemestersYearGroup();
		return r;
	}
	
	public String toLabelShort() {
		String r;
		r = "" + name + " [" + studentsNumber + "]";
		return r;
	}


	public long getId() {
		return id;
	}


	public void setId(long id) {
		this.id = id;
	}


	
	public Integer getScheduleProgress() {
		return scheduleProgress;
	}


	public void setScheduleProgress(Integer scheduleProgress) {
		this.scheduleProgress = scheduleProgress;
	}
	
	
	public boolean isHighlighted() {
		return highlighted;
	}


	public void setHighlighted(boolean highlighted) {
		this.highlighted = highlighted;
	}



	public String getField(int col) {
		if (col == SORT_CONST__ID) {
			return "" + getId();
		} else if (col == SORT_CONST__NAME) {
			return "" + getName();
		} else if (col == SORT_CONST__SUDENTS_NUMBER) {
			return "" + getStudentsNumber();
		} else if (col == SORT_CONST__SEMESTERS_YEAR_GROUP) {
			return "" + getSemestersYearGroup();
		} else if (col == SORT_CONST__SCHEDULE_PROGRESS) {
			return "" + getScheduleProgress();
		}
		return "no field";
	}



	

}